function [] = GenerateSampleData(nVars,nRows)

% nVars = 20; nRows = 100;
fname = sprintf('testData_nRows%d_nVars%d_test.txt',nRows,nVars);
fp = fopen(fname,'w');
for iRows = 1:nRows,
    LOS = round(rand*20)+1;
    if(rand < 0.1)
        OUTPUT = 1;
    else
        OUTPUT = 0;
    end
    AGE = round(rand*14);
    GENDER = round(rand);
    SYSBP = rand*30 - 14;
    RESPRATE = rand*20 - 12;
    count = 1;
    OTHER = [];
    for iVars = 5:nVars-1,
        if(rand < 0.5)
            OTHER(count) = iVars;
            count = count + 1;
        end
    end
    
    fprintf(fp,'%d:%d 1:%d 2:%d 3:%.2f 4:%.2f ',LOS,OUTPUT,AGE,GENDER,SYSBP,RESPRATE);
    for i = 1:length(OTHER),
        fprintf(fp,'%d:1 ',OTHER(i));
    end
    fprintf(fp,'\n');
end

fclose(fp);